//
//  LoopNaviController.swift
//  LoopWeibo
//
//  Created by loop安 on 2016/12/6.
//  Copyright © 2016年 loop. All rights reserved.
//

import UIKit

class LoopNaviController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()

    self.navigationBar.tintColor = UIColor.init(colorLiteralRed: 68/255.0, green:68/255.0 , blue: 68/255.0, alpha: 1)
    }

    override func pushViewController(_ viewController: UIViewController, animated: Bool) {
        let count = childViewControllers.count
        if count > 0 {

            //设置系统自带返回按钮的箭头图片,需要两种方法同时设置
            self.navigationBar.backIndicatorImage = #imageLiteral(resourceName: "navigationbar_back_withtext").withRenderingMode(.alwaysOriginal)
            
            self.navigationBar.backIndicatorTransitionMaskImage = #imageLiteral(resourceName: "navigationbar_back_withtext")
            
            viewController.hidesBottomBarWhenPushed = true
            
        }
        super.pushViewController(viewController, animated: animated)
    }



}
